package com.dingreading.cloud.admin.service;

import com.dingreading.cloud.admin.entity.StoreProjects;
import com.dingreading.cloud.common.util.PageUtil;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;

import java.util.List;
import java.util.Set;

/**
 * 服务层。
 *
 * @author Administrator
 * @since 2023-11-22
 */
public interface StoreProjectsService extends IService<StoreProjects> {

    Page<StoreProjects> pageList(
            PageUtil pageUtil, String keyword, Integer lessonStatus, Integer freeStatus,
            Integer source, Integer enabled, String cooperationType
    );


    List<StoreProjects> getList(String keyword);

    boolean updateEnabled(String uid, Integer enabled, String staffUid, String staffName);

    int dropBean(String uid);

    boolean haveName(String uid, String productName);

    StoreProjects getByUid(String uid);

    List<StoreProjects> listByUids(List<String> uids);

    int getMaxOrderNum();

    StoreProjects getGtShowOrder(Integer orderNum);

    StoreProjects getLtShowOrder(Integer orderNum);

    /**
     * 设置序号
     */
    boolean updateOrderNum(String uid, Integer orderNum, String staffUid, String staffName);

    // 根据服务名称，获取服务信息
    List<StoreProjects> listByProjectNameIn(Set<String> projectNameList);

    boolean updateInfoV2(
            String uid, String projectName, String cooperationType, String operationType, String staffUid, String staffName,
            Integer isPay, String subjectUid, String subjectUidName
    );

    List<StoreProjects> enabledList();
}
